package com.gcc.controller;


import com.gcc.common.Result;
import com.gcc.pojo.StudyAbility;
import com.gcc.pojo.StudyDuration;
import com.gcc.service.StudyAbilityService;
import com.gcc.service.StudyDurationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author gcc
 * @since 2023-02-02
 */
@RestController
@RequestMapping("/GetStudyDurationByUserId")
public class StudyDurationController {
    @Resource
    private StudyDurationService sds;

    @GetMapping("/{student_id}/{course_id}")
    public Result<List<StudyDuration>> getStudyDurationByUserId(@PathVariable String student_id, @PathVariable String course_id) {
        return Result.success(sds.getStudyDurationByUserId(student_id, course_id));
    }
}

